<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var obj = {
        color: 'red',
        weight: '100g',
        brand: 'huawei',
        type: '12',
        watchMovie: function () {
          console.log('我在看电影')
        },
        listenMusic: function () {
          console.log('我在听音乐')
        },
        playGame: function () {
          console.log('我在打游戏')
        },
        playCode: function () {
          console.log('我在敲代码')
        }
      }
      console.log(obj.color);
      obj.playCode();
      obj.playGame();
    </script>
  </body>
</html>
